package com.codeplay.service;

import com.codeplay.entity.Permission;
import java.util.List;
import java.util.Set;

public interface PermissionService {
    // 基础CRUD操作
    Permission createPermission(Permission permission);
    Permission updatePermission(Long id, Permission permission);
    void deletePermission(Long id);
    Permission getPermissionById(Long id);
    Permission getPermissionByName(String name);
    List<Permission> getAllPermissions();
    
    // 批量操作
    List<Permission> createPermissions(List<Permission> permissions);
    Set<Permission> getPermissionsByNames(Set<String> names);
    
    // 权限验证
    boolean existsByName(String name);
    
    // 权限分类管理
    List<Permission> getPermissionsByCategory(String category);
    List<String> getAllCategories();
} 